]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Rename _redisplay() functions unrelated to BaseAppView
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 17 Feb 2020 14:35:49 +0000 (15:35 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Sun, 8 Mar 2020 00:42:40 +0000 (00:42 +0000)
The _redisplay() function is usally used for subclasses of BaseAppView
which want to implement their own _redisplay() function, having that
function name in two classes which have nothing to do with BaseAppView
can be quite confusing. Make those names less confusing and call the
functions  _sync() and _rebuildMenu() instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1011

js/ui/appDisplay.js

index 4241bd7fb966cb2046531d521f01458dd30b305a..97bf72d6a8b1267d3faffcfdb87edf8db4f8444c 100644 (file)
@@ -1501,8 +1501,8 @@ var FolderIcon = GObject.registerClass({
 
         this.connect('destroy', this._onDestroy.bind(this));
 
-        this._folder.connect('changed', this._redisplay.bind(this));
-        this._redisplay();
+        this._folder.connect('changed', this._sync.bind(this));
+        this._sync();
     }
 
     _onDestroy() {
@@ -1617,7 +1617,7 @@ var FolderIcon = GObject.registerClass({
         this.emit('name-changed');
     }
 
-    _redisplay() {
+    _sync() {
         this._updateName();
         this.visible = this.view.getAllItems().length > 0;
         this.icon.update();
@@ -2440,7 +2440,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
         Main.uiGroup.add_actor(this.actor);
     }
 
-    _redisplay() {
+    _rebuildMenu() {
         this.removeAll();
 
         let windows = this._source.app.get_windows().filter(
@@ -2557,7 +2557,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
     }
 
     popup(_activatingButton) {
-        this._redisplay();
+        this._rebuildMenu();
         this.open();
     }
 };